package com.ruicar.afs.cloud.apply.admin.manage.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.ruicar.afs.cloud.common.core.entity.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

/**
 * @author Ice
 * @date 2020/9/5 11:29
 */
@Data
@TableName("sys_user_temp")
public class SysUserTemp extends BaseEntity<SysUserTemp> {

    /**
     * The Username.
     */
    private String username;

    /**
     * The User real name.
     */
    private String userRealName;

    /**
     * The Password.
     */
    private String password;

    /**
     * The Phone.
     */
    private String phone;

    /**
     * The User email.
     */
    private String userEmail;

    /**
     * The Dept id.
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long deptId;

    /**
     * 渠道ID码
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long channelId;

    /**
     * 身份证号
     */
    private String identityNumber;

    /**
     * 新车审核状态
     */
    private String newStatus;

    /**
     * 新车工作流审核id
     */
    private String newDataId;

    /**
     * 二手车审核状态
     */
    private String oldStatus;

    /**
     * 二手车工作流审核id
     */
    private String oldDataId;

    /**
     * The Lock flag.
     */
    private String lockFlag;

    @TableField(exist = false)
    @ApiModelProperty(value = "所属部门名称")
    private String departmentTitle;

    @TableField(exist = false)
    @ApiModelProperty(value = "用户拥有二手车角色")
    private List<SysRole> oldRoles;
    @TableField(exist = false)
    @ApiModelProperty(value = "用户拥有新车角色")
    private List<SysRole> newRoles;

    @TableField(exist = false)
    @ApiModelProperty(value = "用户拥有的角色")
    private String roleName;

    @TableField(exist = false)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long userId;

}
